package com.ky.home.controller;


import com.ky.common.vo.R;
import com.ky.home.entity.Exp;
import com.ky.home.mapper.ExpMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 经验表 前端控制器
 * </p>
 *
 * @author pl
 * @since 2024-06-17
 */
@RestController
@RequestMapping("/home")
public class ExpController {
    @Autowired
    private ExpMapper expMapper;
    @RequestMapping("/getExp")
    public R getExp() {
        List<Exp> expList = expMapper.selectList(null);
        if (expList!=null){
            return R.ok(expList);
        }
        return R.fail("查询失败");
    }
}

